<?
    abstract class PrincipioLab_Mapper
    {
        protected static $db_table = null;


        protected static function getPrefix()
        {
            throw new RuntimeException("Unimplemented");
        }


        protected static function getDbTableName()
        {
            throw new RuntimeException("Unimplemented");
        }


        public static function getDBTable()
        {
            if (is_null(static::$db_table))
            {
                $t = static::getPrefix()."_Model_DbTable_".static::getDbTableName();
                static::$db_table = new $t;
            };

            return static::$db_table;
        }


        public static function dbException(Exception $ex, $message)
        {
            $registry = Zend_Registry::getInstance();
            $registry['Logger']->log($message, Zend_Log::EMERG, $ex);
            return false;
        }
    };
?>